package Objects;

import java.util.Random;

import com.InfinityRun.Assets;
import com.InfinityRun.MainGame;
import com.graphics.Animation;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.util.Log;

public class Obstacle extends GameObject
{
	float speedX;
	float speedY;
	Bitmap image;

	public Obstacle(float w, float h,float sX,float sY, Bitmap image)
	{
		super(0,0 - h,w,h);		
		this.speedX = sX;
		this.speedY = sY;
		
		this.image = image;
	}
	
	@Override
	public void Update(float deltaTime) 
	{
		super.Update(deltaTime);
		Movement(deltaTime);
	}

	@Override
	public void Draw(Canvas c) 
	{
		c.drawBitmap(image, this.bounds.lowerLeft.x, this.bounds.lowerLeft.y, null);
	}
	
	public void Movement(float deltaTime)
	{
		this.position.x += speedX * deltaTime;
		this.position.y += speedY * deltaTime;
	}
}
